﻿<controls:ChildWindow x:Class="Ewav.ConditionalAssign"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" 
		   xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
		   xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
		   mc:Ignorable="d" 
           xmlns:uc="clr-namespace:Ewav"
           Title="Variable with Conditional Assignment" HorizontalAlignment="Left" VerticalAlignment="Top" Style="{StaticResource ChildWindowStyle1}">
    <Grid x:Name="LayoutRoot" Margin="2">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
    	<StackPanel Margin="8,8,0,0" Orientation="Vertical" Grid.RowSpan="2" d:LayoutOverrides="Height">
    		<sdk:Label x:Name="lblField" HorizontalAlignment="Left" Content="Assign Field:"/>
    		<TextBox x:Name="txtDestinationField" HorizontalAlignment="Left" TextWrapping="Wrap" Width="224"/>
    		<sdk:Label x:Name="lblType" HorizontalAlignment="Left" Content="Assign Field Type:" Margin="0,5,0,0"/>
    		<ComboBox x:Name="cbxFieldType" HorizontalAlignment="Left" Width="224"  SelectionChanged="cbxFieldType_SelectionChanged"/>
    		<HyperlinkButton x:Name="btnIfCondition" Content="Add/Edit Condition" Margin="117,0,0,0" FontWeight="Bold" Width="116" HorizontalAlignment="Left" Click="btnIfCondition_Click" Visibility="Collapsed"/>
    		<TextBlock x:Name="lblAssignCondition" HorizontalAlignment="Left" TextWrapping="Wrap" Text="Assign Condition:" Margin="0,5,0,0"/>
    		<StackPanel Orientation="Vertical" Width="621" Height="171" HorizontalAlignment="Left" VerticalAlignment="Top">
    			<StackPanel x:Name="pnlGuidedMode" Height="168" Visibility="Visible" VerticalAlignment="Top">
    				<Border Height="166" Margin="0" BorderThickness="1" BorderBrush="#FFB9B9B9">
    					<ScrollViewer x:Name="scroll_content" HorizontalContentAlignment="Center" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Visible" DataContext="{Binding}" Height="166">
    						<StackPanel Grid.Row="0" x:Name="pnlContainer" >
    							<uc:EwavFilter x:Name="FilterCtrl" />
    						</StackPanel>
    					</ScrollViewer>
    				</Border>
    			</StackPanel>
    			<StackPanel x:Name="pnlAdvancedMode" d:LayoutOverrides="GridBox" HorizontalAlignment="Left" Margin="1,0,0,0" Background="#FFFBFBFB" Height="168" Width="621" Visibility="Collapsed" d:IsHidden="True" d:IsLocked="True">
    				<Border HorizontalAlignment="Left" Margin="0" BorderBrush="#FF8B8B8B" BorderThickness="1" Width="619" Height="168" ScrollViewer.VerticalScrollBarVisibility="Auto">
    					<TextBlock x:Name="txtAssignCondition" 
    						TextWrapping="Wrap"
    						Height="0" Width="0" />

    				</Border>

    				<!--<Grid x:Name="grdAdvancedModeButtons" Visibility="Collapsed" Click="btnAdvancedMode_Click">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="140"/>
                                    <ColumnDefinition Width="140"/>
                                </Grid.ColumnDefinitions>

                                <Grid.RowDefinitions>
                                    <RowDefinition Height="10" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="20" />
                                </Grid.RowDefinitions>
                                <Button x:Name="btnApplyAdvancedFilter" Grid.Row="1" Grid.Column="0" Width="120" Content="Apply Filter" HorizontalAlignment="Left" Click="btnApplyAdvancedFilter_Click"/>
                                <Button x:Name="btnGuidedMode1"          Grid.Row="1" Grid.Column="1" Width="120" Content="Guided Mode" HorizontalAlignment="Left" />
                            </Grid>-->


    			</StackPanel>
    			<StackPanel x:Name="pnlBtns" Margin="0,-201,3,0" Orientation="Horizontal" d:LayoutOverrides="Width" VerticalAlignment="Top" HorizontalAlignment="Right" Visibility="Collapsed" d:IsHidden="True" d:IsLocked="True">
    				<Button Content="Apply Filter" Width="99" VerticalAlignment="Top"  x:Name="btnApply" Click="btnApply_Click" /><!--Click="btnClear_Click"/>-->    
    <!--Click="btnApply_Click"-->
    				<Button Content="Clear All" Width="57" Margin="20,0,0,0" x:Name="btnClear" />
    			</StackPanel>
    		</StackPanel>
    		<sdk:Label x:Name="lblAssignValue" HorizontalAlignment="Left" Content="Assign Value:" Margin="0,5,0,0" VerticalAlignment="Top"/>
    		<StackPanel Orientation="Vertical" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="0,2,0,0">
    			<ComboBox x:Name="cmbAssignValue" HorizontalAlignment="Left" Width="621" Height="27" Canvas.ZIndex="1" VerticalAlignment="Top" Visibility="Collapsed" />
    			<TextBox x:Name="txtAssignValue" TextWrapping="Wrap" HorizontalAlignment="Left" Width="621" VerticalAlignment="Top"/>
    		</StackPanel>
    		<CheckBox x:Name="checkboxUseElse" Content="Use Else" HorizontalAlignment="Left" Padding="-1,0,0,0" Checked="checkboxUseElse_Checked" Unchecked="checkboxUseElse_Unchecked" FontSize="13.333" Margin="-5,5,0,0" VerticalAlignment="Top"/>
    		<sdk:Label x:Name="lblElseValue" HorizontalAlignment="Left" Content="Else Value:" Margin="0,5,0,0" VerticalAlignment="Top"/>
    		<StackPanel Orientation="Vertical" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,2,0,5">
    			<ComboBox x:Name="cmbElseValue" HorizontalAlignment="Left" Width="621" Height="27" Canvas.ZIndex="1" VerticalAlignment="Top" Visibility="Collapsed" />
    			<TextBox x:Name="txtElseValue" TextWrapping="Wrap" HorizontalAlignment="Left" Width="621" VerticalAlignment="Top"/>
    		</StackPanel>
    		<Button x:Name="OKButton" Content="OK" Click="OKButton_Click" Width="75"  HorizontalAlignment="Center" Margin="0,14,88,0" Style="{StaticResource btnprimary}" Height="28" d:LayoutOverrides="Height" VerticalAlignment="Top"/>

    		<Button x:Name="CancelButton" Content="Cancel" Click="CancelButton_Click" Width="75" HorizontalAlignment="Center" Margin="88,-28,0,0" Style="{StaticResource btnprimary}" Height="28" d:LayoutOverrides="Height" VerticalAlignment="Top"/>
    	</StackPanel>    
    </Grid>
</controls:ChildWindow>
